..
/
download
<?xml version='1.0'?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- From 3031 - Blank pages, general Blank pages normally require no copy.
However, if the reverse side of a blank
page contains classified material,
security markings for the blank page
shall be bold and at the top and bottom
center of the blank page. The blank
page shall reflect the highest
classification of the reverse side, and
include the statement "This page is
unclassified." S1000D Chapter 6.2.1 paragraph 2.4.1.4.
-->
<!-- Code for the above is TBD -->
<!-- From 3031 - Use of page numbers.
Page numbers shall be published as follows:
a. Each data module shall initially be assigned a four digit data module sequence number
beginning with the number 0001. The data module sequence numbers shall run consecutively
throughout the manual.
b. Pages shall be numbered with the data module-sequence number followed by a page number
beginning at 1 separated by a hyphen. For example, "0021-4" is the 4th page in the 21st data module
in a manual.
c. If a data module needs to be inserted between two existing data modules, the new
data module-sequence number is increased by a decimal number. For example if a data module is
added between the 21st and 22nd data modules, its number will be 0021.1. When a manual is revised,
data modules shall be renumbered so that there are no decimal sequence numbers. (JS)
S1000D Chapter 6.2.1 paragraph 2.4.1.4.
-->
<!-- Code for the above is TBD -->
<!-- From 3031 - Front and rear matter page numbering
Front matter and rear matter data modules shall be numbered consistently with the rest of the manual.
Neither alphabetic nor roman numerals shall be used.
S1000D Chapter 6.2.1 paragraph 2.4.1.4.
-->
<!-- From 3031 - Foldout page numbering
Foldout page numbers shall be numbered consecutively using Arabic numbers prefixed by the letters "FP."
The reverse side of foldout pages shall be blank and each foldout page number shall include a
blank page notation.
S1000D Chapter 6.2.1 paragraph 2.4.1.4.
-->
<!-- Added code so pms can produce page sequencing that include the dm sequence -->
<xsl:template match="dmodule/content" mode="pm">
<xsl:choose>
<xsl:when test="faultIsolation | faultReporting">
<xsl:call-template name="process-faults"/>
<xsl:call-template name="process-refs"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="process-refs"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*[not(child::refs)]"/>
</xsl:template>
<xsl:template match="dmodule/content">
<fo:page-sequence master-reference="body-pages" initial-page-number="1"
force-page-count="end-on-even" format="1">
<fo:static-content flow-name="region-before-odd">
<fo:table table-layout="fixed" inline-progression-dimension="100%">
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spanned="2" height="5mm" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<!-- From 3031 - Classification
The overall security classification assigned to a manual shall agree
with the highest security classification assigned to any data module within, and shall be marked
accordingly at the top and bottom of the front cover, title block page, and rear cover sheets.
The security classification markings for every page, including those for unclassified pages,
shall be bold and at the top and bottom center of each page.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Markings
Classification markings are not required at the top and bottom of pages in an unclassified manual.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Commercial classification
Commercial classification (value of attribute commercialClassificiation) shall not be presented.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<fo:table-cell number-columns-spanned="2" padding-after="2pt">
<fo:block text-align="center"
font-size="11pt" font-weight="bold" space-after.conditionality="retain">
<xsl:call-template name="security"/>
</fo:block>
</fo:table-cell>
<!--S1000D, Section 6.2.1, para 2.4.1.1 Publication module code
The publication module code for the complete publication must be located in the header. The
publication module code is located in the top outside corner and presented in 11 pt bold, aligned
to the outer type limit. -->
<fo:table-cell number-columns-spanned="2" padding-after="2pt">
<fo:block text-align="end" font-size="11pt" font-weight="bold">
<xsl:value-of select="$pmcode"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row padding-after="2pt">
<fo:table-cell height="5mm" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="4" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<xsl:attribute name="border-bottom-style">solid</xsl:attribute>
<xsl:attribute name="border-bottom-color">black</xsl:attribute>
<xsl:attribute name="border-bottom-width">thin</xsl:attribute>
<fo:table-cell height="5mm" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="4" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content flow-name="region-after-odd">
<fo:table table-layout="fixed" inline-progression-dimension="100%">
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-body>
<fo:table-row>
<xsl:attribute name="border-top-style">solid</xsl:attribute>
<xsl:attribute name="border-top-color">black</xsl:attribute>
<xsl:attribute name="border-top-width">thin</xsl:attribute>
<fo:table-cell number-columns-spanned="3" height="5mm" padding-before="2pt">
<!-- From S1000D: For customized page-oriented publications an applicability annotation block is presented in the
inside margin of the footer.
When the publication uses applicability annotations this must be included in the page identification.
The applicability must be expressed, by project decision, with serial
number of the Product, with an "Applicability" code or with a human readable expression.
10 pt for 8.5 x 11, 9 pt for index cards
From 3031: The project shall use the S1000D standard page-oriented presentation rules for the applicability annotation.
-->
<fo:block text-align="start">
<xsl:text>Applicable to: </xsl:text>
<xsl:choose>
<xsl:when test="//pm">
<xsl:apply-templates select="//pm/identAndStatusSection/pmStatus/applic"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//dmodule/identAndStatusSection/dmStatus/applic"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="3" padding-before="2pt">
<fo:block text-align="end" font-size="11pt" font-weight="bold" space-after="8pt">
<xsl:apply-templates select="//dmodule/identAndStatusSection/dmAddress/dmIdent/dmCode"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell height="5mm" number-columns-spanned="6" padding-before="2pt">
<fo:block text-align="center"
font-size="11pt" font-weight="bold" wrap-option="no-wrap" overflow="hidden">
<fo:retrieve-marker retrieve-position="last-starting-within-page"
retrieve-class-name="end-of-dm"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="2" height="5mm" padding-before="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<!-- From 3031 - Classification
The overall security classification assigned to a manual shall agree
with the highest security classification assigned to any data module within, and shall be marked
accordingly at the top and bottom of the front cover, title block page, and rear cover sheets.
The security classification markings for every page, including those for unclassified pages,
shall be bold and at the top and bottom center of each page.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Markings
Classification markings are not required at the top and bottom of pages in an unclassified manual.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Commercial classification
Commercial classification (value of attribute commercialClassificiation) shall not be presented.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<fo:table-cell number-columns-spanned="2" padding-before="2pt">
<fo:block space-after="8pt" text-align="center"
font-size="11pt" font-weight="bold">
<xsl:call-template name="security"/>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="2" padding-before="2pt">
<fo:block text-align="end" font-size="11pt" font-weight="bold">
<xsl:text>Page </xsl:text>
<fo:page-number/>
<fo:retrieve-marker retrieve-position="last-starting-within-page"
retrieve-class-name="blank-page"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content flow-name="region-before-even">
<fo:table table-layout="fixed" inline-progression-dimension="100%">
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spanned="2" padding-after="2pt">
<fo:block text-align="start" font-size="11pt" font-weight="bold">
<xsl:value-of select="$pmcode"/>
</fo:block>
</fo:table-cell>
<!-- From 3031 - Classification
The overall security classification assigned to a manual shall agree
with the highest security classification assigned to any data module within, and shall be marked
accordingly at the top and bottom of the front cover, title block page, and rear cover sheets.
The security classification markings for every page, including those for unclassified pages,
shall be bold and at the top and bottom center of each page.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Markings
Classification markings are not required at the top and bottom of pages in an unclassified manual.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Commercial classification
Commercial classification (value of attribute commercialClassificiation) shall not be presented.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<fo:table-cell number-columns-spanned="2" padding-after="2pt">
<fo:block text-align="center"
font-size="11pt" font-weight="bold">
<xsl:call-template name="security"/>
</fo:block>
</fo:table-cell>
<!--S1000D, Section 6.2.1, para 2.4.1.1 Publication module code
The publication module code for the complete publication must be located in the header. The
publication module code is located in the top outside corner and presented in 11 pt bold, aligned
to the outer type limit.-->
<fo:table-cell number-columns-spanned="2" padding-after="2pt">
<xsl:text> </xsl:text>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell height="5mm" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="4" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<xsl:attribute name="border-bottom-style">solid</xsl:attribute>
<xsl:attribute name="border-bottom-color">black</xsl:attribute>
<xsl:attribute name="border-bottom-width">thin</xsl:attribute>
<fo:table-cell height="5mm" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="4" padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-after="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content flow-name="region-after-even">
<fo:table table-layout="fixed" inline-progression-dimension="100%">
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-column column-width="16.7%"/>
<fo:table-body>
<fo:table-row>
<xsl:attribute name="border-top-style">solid</xsl:attribute>
<xsl:attribute name="border-top-color">black</xsl:attribute>
<xsl:attribute name="border-top-width">thin</xsl:attribute>
<!-- From S1000D: For customized page-oriented publications an applicability annotation block is presented in the
inside margin of the footer.
When the publication uses applicability annotations this must be included in the page identification.
The applicability must be expressed, by project decision, with serial
number of the Product, with an "Applicability" code or with a human readable expression.
10 pt for 8.5 x 11, 9 pt for index cards
From 3031: The project shall use the S1000D standard page-oriented presentation rules for the applicability annotation.
-->
<fo:table-cell number-columns-spanned="3" height="5mm" padding-before="2pt">
<fo:block text-align="start" font-size="11pt" font-weight="bold" space-after="8pt">
<xsl:apply-templates select="//dmodule/identAndStatusSection/dmAddress/dmIdent/dmCode"/>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="3" padding-before="2pt">
<fo:block text-align="end">
<xsl:text>Applicable to: </xsl:text>
<xsl:choose>
<xsl:when test="//pm">
<xsl:apply-templates select="//pm/identAndStatusSection/pmStatus/applic"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//dmodule/identAndStatusSection/dmStatus/applic"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell height="5mm" number-columns-spanned="6" padding-before="2pt">
<fo:block text-align="center"
font-size="11pt" font-weight="bold" wrap-option="no-wrap" overflow="hidden">
<fo:retrieve-marker retrieve-position="last-starting-within-page"
retrieve-class-name="end-of-dm"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="2" height="5mm" padding-before="2pt">
<fo:block text-align="start" font-size="11pt" font-weight="bold">
<xsl:text>Page </xsl:text>
<fo:page-number/>
</fo:block>
</fo:table-cell>
<!-- From 3031 - Classification
The overall security classification assigned to a manual shall agree
with the highest security classification assigned to any data module within, and shall be marked
accordingly at the top and bottom of the front cover, title block page, and rear cover sheets.
The security classification markings for every page, including those for unclassified pages,
shall be bold and at the top and bottom center of each page.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Markings
Classification markings are not required at the top and bottom of pages in an unclassified manual.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<!-- From 3031 - Commercial classification
Commercial classification (value of attribute commercialClassificiation) shall not be presented.
S1000D Chapter 6.2.1 paragraph 2.4.2.
-->
<fo:table-cell number-columns-spanned="2" padding-before="2pt">
<fo:block space-after="8pt" text-align="center"
font-size="11pt" font-weight="bold">
<xsl:call-template name="security"/>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="2" padding-before="2pt">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:flow flow-name="region-body" white-space-collapse="true">
<fo:marker marker-class-name="blank-page"> </fo:marker>
<fo:marker marker-class-name="end-of-dm"> </fo:marker>
<fo:block text-align="left" span="all">
<xsl:attribute name="id">
<!-- 8/19/11 - KR - added id for dm references in pubs -->
<xsl:apply-templates select="//dmodule/identAndStatusSection/dmAddress/dmIdent/dmCode"/>
</xsl:attribute>
<!--s1000d_Iss_4_0_1_r1.pdf, Section 6.2.2, para 2.3.2, Table 2 Order and Typography of headings
Order Layout element Point Typestyle Live matter Numbered
size/Leading
1 Centerhead No. 1 14/16 pt Bold Centered No
2 Centerhead No. 2 14/16 pt Bold, italic Centered No
s1000d_Iss_4_0_1_r1.pdf, Section 6.2.2, para 2.3.2, Table 3 Leadings to adjacent headings and text paragraphs:
Order Layout element Leading to Leading to a Leading text Leading table
next lower follow-on text paragraph to footer end
level of paragraph the heading line to the
heading heading
1 Centerhead No. 1 28 pt/10 mm 17 pt/6 mm 27 pt 35 pt
Footnote to Table 3: The leadings are the leadings between the baselines of the components-->
<!--the space above Centerhead No 1 (margin-top) is thus calculated as:
Leading text paragraph to the heading (27pt) minus Centerhead No 1 point size (14pt) = 13pt
the space below Centerhead No 1 (margin-bottom) is thus calcualted as:
Leading to next lower level of heading (28pt) minus CenterHead No 2 point size (14pt) = 14pt
-->
<!--MIL-STD-3031A, para 5.21.1.9:
The element <dmTitle> shall be used and shall contain the title of the referenced data module.-->
<fo:block font-size="14pt" font-weight="bold" text-align="center" keep-with-next="auto"
break-before="page" span="all" margin-top="13pt" margin-bottom="14pt">
<xsl:apply-templates select="ancestor::*/identAndStatusSection/dmAddress//dmTitle"></xsl:apply-templates>
</fo:block>
<!-- 8/19/11 - KR - seems like excess code here
<fo:block id="{generate-id(..)}" span="all">
<xsl:attribute name="space-before">7pt</xsl:attribute>
<xsl:attribute name="space-after">7pt</xsl:attribute>
<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
</fo:block>
-->
<xsl:choose>
<xsl:when test="faultIsolation | faultReporting">
<xsl:call-template name="process-faults"/>
<xsl:call-template name="process-refs"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="process-refs"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*[not(child::refs)]"/>
</fo:block>
<fo:block>
<!-- From 3031, A blank page shall be assigned a number, but it shall appear on the preceding or following page. -->
<fo:marker marker-class-name="blank-page">
<xsl:text> / blank</xsl:text>
</fo:marker>
</fo:block>
<fo:block>
<!-- From 3031: The statement "End of [insert data module title]" shall appear below the last item described in the column for each figure of the tabular lists in the repair parts list and the special tools lists. -->
<!-- From 3031: The words "End of [data module title]" shall be placed at the end of every data module. -->
<fo:marker marker-class-name="end-of-dm">
<xsl:text>End of </xsl:text>
<xsl:apply-templates select="//identAndStatusSection//dmTitle"/>
</fo:marker>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:template>
<xsl:template name="security">
<fo:inline text-transform="uppercase">
<xsl:apply-templates select="//security/@securityClassification"/>
</fo:inline>
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->
gopher://khzae.net/0/s1kd/links/projects/3031/Army S1000D Stylesheets/FO-3031-A00-USARMY-CONTENT_001-00_EN-US.xsl